package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 打卡记录对象 sys_attendance
 *
 * @author ruoyi
 * @date 2025-09-24
 */
@Data
public class SysAttendance extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 打卡记录ID（主键） */
    private Long attendanceId;

    /** 打卡人用户ID（关联用户表主键，非空确保记录归属） */
    @Excel(name = "打卡人用户ID", readConverterExp = "关=联用户表主键，非空确保记录归属")
    private Long userId;

    /** 打卡日期（单独拆分日期字段，便于按日统计打卡数据） */
    @Excel(name = "打卡日期", readConverterExp = "单=独拆分日期字段，便于按日统计打卡数据")
    private Date attendanceDate;

    /** 打卡具体时间（精确到时分秒，记录完整打卡时刻） */
    @Excel(name = "打卡具体时间", readConverterExp = "精=确到时分秒，记录完整打卡时刻")
    private Date attendanceTime;

    /** 打卡类型（01=内勤打卡，02=外勤打卡） */
    @Excel(name = "打卡类型", readConverterExp = "0=1=内勤打卡，02=外勤打卡")
    private String attendanceType;

    /** 打卡图片URL（存储图片在服务器/OSS的访问地址，不直接存二进制避免表过大） */
    @Excel(name = "打卡图片URL", readConverterExp = "存=储图片在服务器/OSS的访问地址，不直接存二进制避免表过大")
    private String attendanceImageUrl;

    private String nickName;

    public void setAttendanceId(Long attendanceId)
    {
        this.attendanceId = attendanceId;
    }

    public Long getAttendanceId()
    {
        return attendanceId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setAttendanceDate(Date attendanceDate)
    {
        this.attendanceDate = attendanceDate;
    }

    public Date getAttendanceDate()
    {
        return attendanceDate;
    }

    public void setAttendanceTime(Date attendanceTime)
    {
        this.attendanceTime = attendanceTime;
    }

    public Date getAttendanceTime()
    {
        return attendanceTime;
    }

    public void setAttendanceType(String attendanceType)
    {
        this.attendanceType = attendanceType;
    }

    public String getAttendanceType()
    {
        return attendanceType;
    }

    public void setAttendanceImageUrl(String attendanceImageUrl)
    {
        this.attendanceImageUrl = attendanceImageUrl;
    }

    public String getAttendanceImageUrl()
    {
        return attendanceImageUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("attendanceId", getAttendanceId())
            .append("userId", getUserId())
            .append("attendanceDate", getAttendanceDate())
            .append("attendanceTime", getAttendanceTime())
            .append("attendanceType", getAttendanceType())
            .append("attendanceImageUrl", getAttendanceImageUrl())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
